<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        html, body {
            width: 100%;
            height: 100%;
            padding: 0;
            margin: 0;
        }

        #canvas {
            margin: 50px;
            border: 1px dashed blue;
        }
    </style>
</head>
<body>
<canvas id="canvas" width="500" height="500"></canvas>
<script>
    var canvas = document.getElementById("canvas");
    var ctx = canvas.getContext("2d");
    ctx.lineWidth = 6;
    ctx.strokeStyle = "red";
    var x = 0, y = 0;

    function drawArc(x, y) {
        ctx.clearRect(0, 0, canvas.width, canvas.height)
        ctx.beginPath();
        ctx.arc(x, y, 30, 0, 2 * Math.PI, true);
        ctx.stroke();
    }

    function animation() {
        x += 0.1
        y += 0.1
        console.log("x", x, y)
        drawArc(x, y);
        window.requestAnimationFrame(animation)

    }


    window.requestAnimationFrame(animation)


    class vector2d {
        constructor() {
            this.x = 0;
            this.y = 0;
        }


    }


</script>
</body>
</html>